package hairmember

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type ProjectTypesRouter struct{}

// InitProjectTypesRouter 初始化 projectTypes表 路由信息
func (s *ProjectTypesRouter) InitProjectTypesRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	projectTypesRouter := Router.Group("projectTypes").Use(middleware.OperationRecord())
	projectTypesRouterWithoutRecord := Router.Group("projectTypes")
	projectTypesRouterWithoutAuth := PublicRouter.Group("projectTypes")
	{
		projectTypesRouter.POST("createProjectTypes", projectTypesApi.CreateProjectTypes)             // 新建projectTypes表
		projectTypesRouter.DELETE("deleteProjectTypes", projectTypesApi.DeleteProjectTypes)           // 删除projectTypes表
		projectTypesRouter.DELETE("deleteProjectTypesByIds", projectTypesApi.DeleteProjectTypesByIds) // 批量删除projectTypes表
		projectTypesRouter.PUT("updateProjectTypes", projectTypesApi.UpdateProjectTypes)              // 更新projectTypes表
	}
	{
		projectTypesRouterWithoutRecord.GET("findProjectTypes", projectTypesApi.FindProjectTypes)       // 根据ID获取projectTypes表
		projectTypesRouterWithoutRecord.GET("getProjectTypesList", projectTypesApi.GetProjectTypesList) // 获取projectTypes表列表
	}
	{
		projectTypesRouterWithoutAuth.GET("getProjectTypesPublic", projectTypesApi.GetProjectTypesPublic) // projectTypes表开放接口
	}
}
